<?php
return [
    'timeZone'=>'Asia/Shanghai',
    'vendorPath' => dirname(dirname(__DIR__)) . '/vendor',
    'extensions' => require(__DIR__ . '/../../vendor/yiisoft/extensions.php'),
	'bootstrap' => ['log', 'debug'],
    'components' => [
	    'db' => [
            'class' => 'yii\db\Connection',
            'dsn' => 'mysql:host=localhost;dbname=function',
            'username' => 'function',
            'password' => 'function!@#',
            'charset' => 'utf8',
			'tablePrefix' => 'biad_'
        ],
	    'user' => [
		    'identityClass' => 'common\models\User',
		    'enableAutoLogin' => true,
	    ],
	    'authManager' => [
	    	'class' => 'base\AuthManager',
	    ],
        'FileCache' => [
            'class' => 'yii\caching\FileCache',
			'cachePath' => dirname(dirname(__DIR__)).'/runtime/cache',
			'directoryLevel' => 2
        ],
		'redis' => [
            'class' => 'yii\redis\Cache',
            'redis' => [
                'hostname' => 'localhost',
                'port' => 6379,
                'database' => 0,
            ],
        ],
		'urlManager' => [
			'enablePrettyUrl' => true,  //启用路由
			
			//'showScriptName' => true,  //false为隐藏 index.php
			//'suffix'=>'.html',  //后缀
			//'enableStrictParsing' => true
			//规则
			'rules' => [
			    'debug/<controller>/<action>' => 'debug/<controller>/<action>',
				'<controller:\w+>/<id:\d+>'=>'<controller>/view',
			    '<controller:\w+>/<action:\w+>/<id:\d+>'=>'<controller>/<action>',
			    '<controller:\w+>/<action:\w+>'=>'<controller>/<action>',
			],
		],
    ],
	'modules' => [
	   'debug' => 'yii\debug\Module',
   ],
];
